package com.lab.book.server;

import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.SystemUtils;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.context.annotation.ImportResource;

import javax.annotation.PostConstruct;
import java.util.TimeZone;
@Slf4j
@EnableDiscoveryClient
@SpringBootApplication(scanBasePackages = "com.lab")
@ImportResource("classpath:transaction.xml")
public class BookServerApplication {
    public static void main(String[] args) {
        SpringApplication.run(BookServerApplication.class, args);
    }

    @PostConstruct
    void started() {
        TimeZone.setDefault(TimeZone.getTimeZone("Asia/Shanghai"));
    }
}
